<extend name="Shops:layout" />
<block name="content">

    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/datatable/dataTables.bootstrap.min.css">

    <script src="__JS__/datatable/jquery.dataTables.js"></script>
    <script src="__JS__/datatable/dataTables.bootstrap.min.js"></script>
<style>
    .pagination>.active>a, .pagination>.active>a:focus, .pagination>.active>a:hover, .pagination>.active>span, .pagination>.active>span:focus, .pagination>.active>span:hover{
        background-color:#e23c3d;
        border-color:#e23c3d;
    }
    a{
        color: black;
    }
    .order_img{
        width: 40px;
    }
</style>
    <div class="wst-body">
        <div class='wst-page-header'>卖家中心 > 圈子管理</div>
        <div>
            <div class='wst-tbar-group' style='text-align:left'>
                <a href='{:U("Home/Circle/index")}' class="btn btn-info">列表</a>
                <a href='{:U("Home/Circle/modify")}' class="btn btn-success">新增</a>
                <!--<div>12321</div>-->
                <!--<span></span>-->
                <!--<a href='{:U("Home/AttributeCats/toEdit")}'><span class='add btn'></span>新增</a>&nbsp;-->
            </div>
            <div >
                <table id="circle" class="table table-striped table-bordered" cellspacing="0" width="100%">
                    <thead>
                    <tr>
                        <th>标题</th>
                        <th>缩略图</th>
                        <th>点赞数</th>
                        <th>发布状态</th>
                        <th>发布时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    </tbody>
                    <tfoot>
                    <tr>
                        <th></th>
                        <th></th>
                        <th></th>
                        <th></th>
                        <th></th>
                        <th></th>
                    </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </div>
    <script>
        $(function(){
            circle();
        });



        function circle(){


            var data=eval({$Circle});
            $('#circle').DataTable(
                    {"deferRender": true,
                        data:data,
                        columns: [
                            { data: 'title' },
                            { data: 'imgThums' },
                            { data: 'like' },
                            { data: 'isShow' },
                            { data: 'time' },
                            { data: 'action'}


                        ],
                        "language": {
                            "sProcessing": "处理中...",
                            "sLengthMenu": "显示 _MENU_ 项结果",
                            "sZeroRecords": "没有匹配结果",
                            "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                            "sInfoEmpty": "显示第 0 至 0 项结果，共 0 项",
                            "sInfoFiltered": "(由 _MAX_ 项结果过滤)",
                            "sInfoPostFix": "",
                            "sSearch": "搜索:",
                            "sEmptyTable": "表中数据为空",
                            "sLoadingRecords": "载入中...",
                            "sInfoThousands": ",",
                            "oPaginate": {
                                "sFirst": "首页",
                                "sPrevious": "上页",
                                "sNext": "下页",
                                "sLast": "末页"
                            },
                            "oAria": {
                                "sSortAscending": ": 以升序排列此列",
                                "sSortDescending": ": 以降序排列此列"
                            }
                        },
                        "initComplete": function () {
                            var api = this.api();

                            api.columns().indexes().flatten().each( function ( i ) {

                                var column = api.column( i );
                                var select = $('<select class="form-control input-sm"><option value=""></option></select>')
                                        .appendTo( $(column.footer()).empty() )
                                        .on( 'change', function () {
                                            var val = $.fn.dataTable.util.escapeRegex(
                                                    $(this).val()
                                            );
                                            column
                                                    .search( val ? '^'+val+'$' : '', true, false )
                                                    .draw();
                                        } );
                                column.data().unique().sort().each( function ( d, j ) {
                                    select.append( '<option value="'+d+'">'+d+'</option>' );
                                } );
                            } );
                        }

                    })
        }
    </script>
</block> 